<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script type="text/javascript">
			/**
			 * 类(对象)
			 * 	class
			 * 
			 */
			class Animal {
				controllers() {
					console.log("animal~~~~")
					this.color="skyblue";
				}
				//对对象的属性并且赋值，关键对象是赋值给对象属性赋值
				//pubulic color="red";
				sleep(){
					console.log("碎gd!")
				}
			}

			//实例化Animal
			let cat = new Animal();
			cat.sleep(cat);
			console.log(cat);
			//constutor
			function melon() {
				
			}
			//prototype上的属性
			melon.prototype.changlaoshi = "108";
			//实例
			var bolaoshi = new melon();

			console.log(bolaoshi);
		</script>
	</body>

</html>